package com.library.service;

import com.library.bean.Admin;
import com.library.bean.ZhuangTai;
import com.library.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;


/**
 * 登录验证
 */

@Service
//事务回滚
@Transactional(isolation = Isolation.REPEATABLE_READ, readOnly = false, noRollbackForClassName = "java.lang.ArithmeticException")
public class AdminImpl implements AdminMapper {

    @Autowired
    AdminMapper adminMapper;




    @Override
    public Admin selectAdminOrUserByUsernameAndPassword(Admin admin) {


        Admin admin1 = adminMapper.selectAdminOrUserByUsernameAndPassword(admin);


        return admin1;


    }
}
